package cn.itcast.crm.service;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import cn.itcast.crm.domain.Customer;

public interface CustomerService {

	@Path("/noassocationcustomer")
	@GET
	@Produces({ "application/json", "application/xml" })
	// 查询所有的为关联用户列表
	public List<Customer> findNoAssocationCustomer();

	// 以关联指定区域的属性列表
	@Path("/hasassocationfixedareacustomer/{fixedareaid}")
	@GET
	@Produces({ "application/json", "application/xml" })
	public List<Customer> findHasAssocationFixedAreaCustomer(@PathParam("fixedareaid") String fixedAreaId);

	// 將客戶关联到指定区域
	@Path("/assocationcustomertofixedarea")
	@PUT
	public void assocationCustomerToFixedArea(@QueryParam("CustomerIdStr") String CustomerIdStr,
			@QueryParam("fixedAreaId") String fixedAreaId);

	@Path("/customer")
	@POST
	@Produces({ "application/json", "application/xml" })
	public void regist(Customer customer);
	//邮箱状态码的查询，看是否绑定
	@Path("/customer/telephone/{telephone}")
	@GET
	@Produces({"application/json","application/xml"})
	public Customer findByTelephone(@PathParam("telephone") String telephone);
	//邮箱状态码的
	@Path("/customer/update/{telephone}")
	@GET
	@Produces({"application/json","application/xml"})
	public void updateType(@PathParam("telephone") String telephone);
}